# -*- coding:utf-8 -*-

import csv
import scipy.interpolate as sp
import numpy
import janela
import wx
import wx.lib.dialogs

class waterNext(object):
	""" Class doc """
	#Temperatura
	Temperature=numpy.array([0])
	#Pressão
	Press=numpy.array([0])
	#Volume
	Volume=numpy.array([0])
	#Energia
	Energy=numpy.array([0])
	#Entalpia
	Enthalpy=numpy.array([0])
	#Entropia
	Entropy=numpy.array([0])
	
	def __init__ (self,path):
		""" Class initialiser """
		csvfile=open(path, 'rb')
		reader = csv.reader(csvfile, delimiter=',', quotechar='\"')
		for row in reader:
			self.Temperature=numpy.append(self.Temperature,float(row[0]))
			self.Volume=numpy.append(self.Volume,float(row[1]))
			self.Energy=numpy.append(self.Energy,float(row[2]))
			self.Enthalpy=numpy.append(self.Enthalpy,float(row[3]))
			self.Entropy=numpy.append(self.Entropy,float(row[4]))
		self.Temperature=numpy.delete(self.Temperature,0)
		self.Press=numpy.delete(self.Press,0)
		self.Volume=numpy.delete(self.Volume,0)
		self.Energy=numpy.delete(self.Energy,0)
		self.Enthalpy=numpy.delete(self.Enthalpy,0)
		self.Entropy=numpy.delete(self.Entropy,0)
		'''completing dictionary'''
		self.dados={'names':['Temperature','Pressure','Volume','Energy','Enthalpy','Entropy'],
			'unit':['[°C]','[kPa]','[m³/kg]','[kJ/kg]','[kJ/kg]','[kJ/kg]'],
			'more':['Temperatura', 'Pressão', 'Volume Especifico','Energia Interna', 'Entalpia', 'Entropia'],
			'index':['Temperature','Pressure','Volume','Energy','Enthalpy','Entropy'],
			'unit_index':['[°C]','[kPa]','[m³/kg]','[kJ/kg]','[kJ/kg]','[kJ/kg]']}
		self.dados['Temperature'] = self.Temperature
		self.dados['Pressure'] = self.Press
		self.dados['Volume'] = self.Volume
		self.dados['Energy'] = self.Energy
		self.dados['Enthalpy'] = self.Enthalpy
		self.dados['Entropy'] = self.Entropy
	def print_all(self):
		for i in self.dados['index']:
			print i
			print self.dados[i]
print "m³"

tabela = raw_input()
dado=waterNext('./a7/' + tabela + '.csv')
dado.print_all()
#app = wx.App(False)

#j=janela.text("Teste",saida)

#j.Show()

#app.MainLoop()
